import request from '@/utils/request'

// 借款订单详情
export const orderDetail = (orderId) => {
  return request({
    url: `/order/detail/${orderId}`,
    method: 'get'
  })
}
// 收款账户信息
export const bankcardByOrderId = (orderId) => {
  return request({
    url: `/account/bankcardByOrderId/${orderId}`,
    method: 'get'
  })
}
// 放款详情 & 放款流水
export const paymentDetail = (orderId) => {
  return request({
    url: `/finance/payment/detail/${orderId}`,
    method: 'get'
  })
}
// 还款详情
export const repaymentPlanList = (orderId) => {
  return request({
    url: `/finance/repayment/repaymentPlanList/${orderId}`,
    method: 'get'
  })
}
// 还款流水
export const manualRepaymentList = (orderId) => {
  return request({
    url: `/finance/repayment/manualRepaymentList/${orderId}`,
    method: 'get'
  })
}
// 获取还款码
export const getRepaymentCode = (params) => {
  return request({
    url: '/finance/repayment/vaNumber',
    params,
    method: 'get'
  })
}
export const addRepaymentCode = (data) => {
  return request({
    url: '/finance/repayment/vaNumberInfo',
    data,
    method: 'post'
  })
}
export const vaNumberInfoCopy = (id) => {
  return request({
    url: `/finance/repayment/vaNumberInfoCopy/${id}`,
    method: 'get'
  })
}
export const needAddRepaymentCode = (orderId) => {
  return request({
    url: `/finance/repayment/vaNumberInfo/${orderId}`,
    method: 'get'
  })
}
